package com.yang.frost.blueberry.service;

import com.yang.frost.blueberry.domain.SysDepartment;
import com.yang.frost.blueberry.vo.SysDepartmentQueryVo;
import com.yang.frost.blueberry.vo.SysDepartmentTreeVo;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @author 10296
 * @date 2021/1/25
 * @Description:
 */
public interface SysDepartmentService {

    /**
     * 保存
     *
     * @param sysDepartment
     * @return
     * @throws Exception
     */
    int saveSysDepartment(SysDepartment sysDepartment) throws Exception;

    /**
     * 修改
     *
     * @param sysDepartment
     * @return
     * @throws Exception
     */
    int updateSysDepartment(SysDepartment sysDepartment) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    int deleteSysDepartment(Long id) throws Exception;

    /**
     * 根据ID获取查询对象
     *
     * @param id
     * @return
     * @throws Exception
     */
    SysDepartment getSysDepartmentById(Serializable id) throws Exception;

    /**
     * 获取分页对象
     *
     * @param paramsMap
     * @return
     * @throws Exception
     */
    List<Map<String, Object>> getSysDepartmentPageList(Map<String, Object> paramsMap) throws Exception;

    /**
     * 根据id校验部门是否存在并且已启用
     *
     * @param id
     * @return
     * @throws Exception
     */
    int isEnableSysDepartment(Long id) throws Exception;

    /**
     * 获取所有可用的部门列表
     *
     * @return
     */
    List<SysDepartment> getAllDepartmentList();

    /**
     * 获取所有可用的部门树形列表
     *
     * @return
     */
    List<SysDepartmentTreeVo> getDepartmentTree();

}
